Thực đơn
Bản_mẫu:Val Sự giới thiệuVal stands for the number value that is its first parameter. Val specializes in scientific notations and uncertainty notations, and in a measurement value with physical units. It formats the number (with possible unit) according to the Manual of Style and keeps the expression from wrapping across lines.
Express a numeral:
{{val|123456.78901}}
→ value, formated with gaps: 12345678901, or with |fmt=commas
→ 12345678901.{{val|number|number}}
→ value ± uncertainty, like 123478±56{{val|number|(number)}}
→ value(uncertainty), like 12345(56).{{val|number|number|number}}
→value +uncertaintyExpress a measurement value with a unit, for example {{val|4|ul=m/s2}}
→ 4 m/s2. The keyboard characters m/s2 are a "unit code" that |u=m/s2
marks up, or that |ul=m/s2
additionally links to its articulation.
Because the unit spacing and markup is a style issue, Val provides these for you. There are a large number of unit codes that Val understands and keeps "up to code". A unit code is usually composed of one or more abbreviated unit names and the usual math symbols on the typical keyboard. See {{Val/units}}.
Some unit-code flexibility is provided by having four parameters to work the unit-code system: whether to link one or not, (see Overlinking) , and whether to form a ratio or not with a unit code.
{{val|number|u=unit code}}
→ number markup , such as 98 m/s2{{val|number|ul=unit code}}
→ number [[Article|markup]], such as 98 m/s2{{val|number|u=unit code|upl=unit code}}
→ number markup/[[Article|markup]], such as 98 m/s2{{val|number|ul=unit code|up=unit code}}
→ [[Article|markup]]/markup, such as 98 m/s2To bypass the unit code system, if |u=
does not recognize your unit code, it will accept any wikitext and render it as usual.
{{val|5.4|u=[[kg]]⋅[[meter|m]]/s<sup>2</sup>}}
→ 54 kg⋅m/s2{{val|7.6|u=[[metre per second squared|m/s<sup>2</sup>]]}}
→ 76 m/s2See below for § How to add units to the unit code system.
Sometimes a number and unit code is not enough. A prefix or suffix are also available, |p=
and |s=
.
{{val|7600|u=C⋅Ga|p=>|s=<}}
→ >7600 C⋅Ga<{{val|7600|u=C|p=<span style="color:green"><sup>|s=</span></sup>}}
→ 7600 CSee {{val/testcases}} to learn the val parameters by a example. It's comprehensive, and there's over 100 examples.
Thực đơn
Bản_mẫu:Val Sự giới thiệuLiên quan
Bản Máy Bản mở rộng Bản Mế Bản Motet Bản Mù Bản mạch chủ Bản mẫu Bản danh sách của Schindler Bảng mã IOC Bản quyền thể thao tại Việt NamTài liệu tham khảo
WikiPedia: Bản_mẫu:Val